package no.ntnu.fp.model.events;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

import no.ntnu.fp.model.MeetingRoom;
import no.ntnu.fp.utils.MeetingRoomSchedule;

@SuppressWarnings("serial")
public class DialogRoomScheduleChangeEvent extends ModelEvent {
	private final List<MeetingRoom> oldRooms, rooms;
	private final MeetingRoomSchedule schedule;

	public DialogRoomScheduleChangeEvent(Object source, 
			List<MeetingRoom> oldRooms, List<MeetingRoom> rooms,
			MeetingRoomSchedule schedule) {
		super(source);
		this.oldRooms = new CopyOnWriteArrayList<MeetingRoom>(oldRooms);
		this.rooms = new CopyOnWriteArrayList<MeetingRoom>(rooms);
		this.schedule = schedule;
	}

	public MeetingRoomSchedule getSchedule() {
		return schedule;
	}


	public List<MeetingRoom> getOldRooms() {
		return oldRooms;
	}

	public List<MeetingRoom> getRooms() {
		return rooms;
	}

}
